const remote = require('electron').remote;
const dialog = remote.dialog;
function onClick_MessageBox(){
    const label = document.getElementById('label');
    var options = {};
    options.title = '信息';
    options.message = '这是一个消息提示框';
    label.innerText = dialog.showMessageBox(options);        
}
function onClick_MessageBoxIcon() {
    const label = document.getElementById('label');
    var options = {};
    options.title = '信息';
    options.message = '定制消息对话框的图标';
    options.icon = '../image/timg.jpg';
    label.innerText = dialog.showMessageBox(options); 
}

function onClick_MessageBoxType() {
    const label = document.getElementById('label');
    var options = {};
    options.title = '信息';
    options.message = '设置消息对话框的类型';
    //options.type = 'info';
    // options.type = 'error';
    // options.type = 'question';
    options.type = 'warning';
    //options.icon = '../image/timg.jpg';
    label.innerText = dialog.showMessageBox(options); 
}
function onClick_MessageBoxMultiButtons() {
    var options = {};
    options.title = '信息';
    options.message = '包含多个按钮的消息对话框';
    options.buttons = ['按钮1','按钮2','按钮3','按钮4','按钮5'];
    label.innerText = dialog.showMessageBox(options);
}
